package com.xuhuan.example.example061;

/**
 * @author: huan.xu
 * @create: 2023/11/14 10:37
 * @description: 圆形
 **/
public class Circle extends Shape {

    private double radius;

    public Circle(double radius) {
        this.radius = radius;
    }

    /**
     * 获取面积
     *
     * @return
     */
    @Override
    public double getArea() {
        return Math.PI * Math.pow(radius, 2);
    }
}
